#include <iostream>
using namespace std;
template <class T>
class Complex {
private:
    T real;
    T img;
public:
    // 构造函数
    Complex(T r = 0, T i = 0) : real(r), img(i) {}
    // +运算符重载函数
    Complex operator+(const Complex& c) const {
        return Complex(real + c.real, img + c.img);
    }
    // 输出函数
    void print() const {
        cout << "(" << real << ", " << img << ")" << endl;
    }
};
int main() {
    double real1, img1, real2, img2;
    // 输入两个复数的实部和虚部
    cin >> real1 >> img1;
    cin >> real2 >> img2;
    Complex<double> x(real1, img1);
    Complex<double> y(real2, img2);
    Complex<double> sum = x + y;
    sum.print();
    return 0;
}